Skip to content

Conversation

@Seoya0512
Copy link
Contributor

@Seoya0512 Seoya0512 commented Nov 12, 2025

답안 제출 문제

작성자 체크 리스트

  • Projects의 오른쪽 버튼(▼)을 눌러 확장한 뒤, Week를 현재 주차로 설정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 StatusIn Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

검토자 체크 리스트

Important

본인 답안 제출 뿐만 아니라 다른 분 PR 하나 이상을 반드시 검토를 해주셔야 합니다!

  • 바로 이전에 올라온 PR에 본인을 코드 리뷰어로 추가해주세요.
  • 본인이 검토해야하는 PR의 답안 코드에 피드백을 주세요.
  • 토요일 전까지 PR을 병합할 수 있도록 승인해주세요.

@BaeKwangho BaeKwangho self-requested a review November 13, 2025 11:41
Copy link
Contributor

@BaeKwangho BaeKwangho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

정성스러운 주석 덕분에 리뷰가 재밌었습니다. 남은 시간도 화이팅 하세요

- 버킷을 뒤에서부터 순회하며 상위 k개 숫자 채우기: O(n)

Space Complexity: O(n)
- freq 딕셔너리와 bucket 리스트로 인해 O(n) 발생
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

freq 딕셔너리가 없어서 살짝 헷갈렸어요. hash_map 을 말씀하시는게 맞을까요?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오, 네네 맞습니다👍

for num in nums:
hash_map[num] = hash_map.get(num, 0) + 1

# 인덱스 = 등장 횟수, 값 = 그 횟수만큼 등장한 숫자 리스트
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

최대한 작성해두신 구현방식을 이해해보려고 했는데, 어려웠던 것 같아요!
예시 포맷을 작성해 두는 것도 좋은 방법일 것 같습니다. 저도 그래야겠어요 ㅎㅎ...

Suggested change
# 인덱스 = 등장 횟수, 값 = 그 횟수만큼 등장한 숫자 리스트
# e.g) let nums = [1,6,6,3,2,6,8], bucket = [[1,3,2,8],[],[6]]

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오오 좋은 주석 방식 공유해주셔서 감사합니다 ☺️

return []

'''
(개선)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋은 개선포인트네요! 👏

@Hong-Study
Copy link
Contributor

코드 리뷰 주신 내용을 보고 참고하고자 확인해봤는데 너무 잘 작성되어 있어서 한 수 배우고 갑니다. ㅎㅎ

Copy link
Contributor

@TonyKim9401 TonyKim9401 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1주차 문제 풀이 고생하셨습니다!
온보딩 및 스터디 적응 하시는데 앞으로 조금 더 힘내주시고 앞으로의 15주간 여정 응원합니다.
2주차 문제 풀이도 파이팅입니다!

@dalestudy dalestudy bot added this pull request to the merge queue Nov 16, 2025
@DaleSeo DaleSeo removed this pull request from the merge queue due to the queue being cleared Nov 16, 2025
@dalestudy dalestudy bot added this pull request to the merge queue Nov 16, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 16, 2025
@dalestudy dalestudy bot added this pull request to the merge queue Nov 17, 2025
Merged via the queue into DaleStudy:main with commit 9b7b419 Nov 17, 2025
1 check passed
@github-project-automation github-project-automation bot moved this from In Review to Completed in 리트코드 스터디 6기 Nov 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Completed

Development

Successfully merging this pull request may close these issues.

4 participants